package top.skihub.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.nacos.api.config.annotation.NacosValue;

@RestController
public class ConfigController {

    @Value("/testPlanKey")
    String testKey;

    @NacosValue(value = "rate", autoRefreshed = true)
    String rate;

    @RequestMapping("/testPlainKey")
    public String test() {
        return testKey;
    }

    @RequestMapping("/rate")
    public String rate() {
        return rate;
    }
}